<%@ page pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<div class="pageContent">
    <form method="post" action="detail/update" onsubmit="return iframeCallback(this, navTabAjaxDone);" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this);">
        <input type="hidden" name="styleId" value="${secDetail.styleId}"/>
        <div class="pageFormContent" >
            <p>
                <label>装修图名称：</label>
                <input name="styleName" class="required" type="text" size="30"  value="${secDetail.styleName}"/>
            </p>
            <p>
                <label>创始人：</label>
                <input name="styleCompany" class="required" type="text" size="30"  value="${secDetail.styleCompany}"/>
            </p>

            <p>
                <label>指数：</label>
                <input type="text"  value="${secDetail.styleNumber}" name="styleNumber" class="textInput">
            </p>

            </br></br>
        </div>
        <div>
            <label>风格小类：</label>
            <c:forEach items="${lable}" var="list">
                <c:if test="${list.styleBigType == 1}">

                        <input type="checkbox" name="laber"  value="${list.styleId}"/><span>${list.styleLaber}</span>

                </c:if>
            </c:forEach>
            <</br>

            <label>空间小类：</label>
            <c:forEach items="${lable}" var="list">
                <c:if test="${list.styleBigType == 2}">
                                <input type="checkbox" name="laber"  value="${list.styleId}"/><span>${list.styleLaber}</span>
                </c:if>
            </c:forEach>

            </br>

            <label>局部小类：</label>
            <c:forEach items="${lable}" var="list">
                <c:if test="${list.styleBigType == 3}">
                                <input type="checkbox" name="laber"  value="${list.styleId}"/><span>${list.styleLaber}</span>
                </c:if>
            </c:forEach>

            </br>

            <label>户型小类：</label>
            <c:forEach items="${lable}" var="list">
                <c:if test="${list.styleBigType == 4}">
                                <input type="checkbox" name="laber"  value="${list.styleId}"/><span>${list.styleLaber}</span>
                </c:if>
            </c:forEach>
            </br>

        </div>
        <p>
        <div class="unit" >
            <label>上传多个文件：</label>
            <ul id="upload-preview" class="upload-preview"></ul>
            <div class="upload-wrap" rel="#upload-preview">
                <input type="file" name="file2" accept="image/*" multiple="multiple">
            </div>
        </div>
        </p>
        <div class="formBar">
            <ul>
                <!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li>
                    <div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script>

$(function(){

 var ids = ${secShuZu};

//选中每个value与数组中value相同的checkbox
$.each(ids, function(i,item){

$("input[name=laber][value="+item+"]").attr("checked","checked");
        });
});

</script>






